package org.dtrd.modules.tool.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.dtrd.common.aspect.annotation.AutoLog;
import org.dtrd.modules.tool.entity.bean.ToolsDetail;
import org.dtrd.modules.tool.entity.bean.ToolsListInfo;
import org.dtrd.modules.tool.entity.bean.ToolsListRequest;
import org.dtrd.modules.tool.entity.bean.ToolsPageRequest;
import org.dtrd.modules.tool.service.IDtrdEntRdToolsService;
import org.dtrd.common.api.vo.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import org.dtrd.base.BaseController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;

import static org.dtrd.common.constant.CommonConstant.*;
import static org.dtrd.config.system.SystemState.ResponseState.*;

/**
 * <p>
 *  前端控制器
 * </p>
 * @author xiao
 * @since 2022-05-25
 */
@Api(tags = "工具箱")
@RestController
@RequestMapping("/tools")
public class DtrdEntRdToolsController extends BaseController {

    @Autowired
    private IDtrdEntRdToolsService toolsService;


    @ApiOperation(value = "查询列表", response = ToolsListInfo.class)
    @GetMapping("/list")
    @AutoLog(value="查询列表", operateType = OPERATE_TYPE_QUERY)
    public Result<?> getToolsList(){
        List<ToolsListInfo> list = toolsService.getToolsList();
        return Result.OK(list);
    }

}
